package com.csap.framework.apidoc.test;

import com.csap.framework.annotation.apidoc.ApiModel;
import com.csap.framework.annotation.apidoc.ApiModelProperty;
import com.csap.framework.annotation.apidoc.Group;
import com.csap.framework.annotation.apidoc.Request;
import lombok.Data;
import org.springframework.web.multipart.MultipartFile;

import javax.validation.constraints.NotNull;
import java.util.List;

@Data
@ApiModel(value = "授权信息")
public class AuthorizationParam {
    /**
     * 菜单的ID
     */
    @ApiModelProperty(value = "菜单的ID列表", groups = {
            @Group(value = "authorization", request = @Request)
    })
    private List<Long> menus;
    /**
     * 按钮的ID
     */
    @ApiModelProperty(value = "按钮的ID列表", groups = {
            @Group(value = "authorization", request = @Request)
    })
    private List<Long> buttons;
    /**
     * 角色的ID
     */
    @ApiModelProperty(value = "角色ID", groups = {
            @Group(value = "authorization", request = @Request(required = true))
    })
    @NotNull(message = "角色ID未传")
    private int ruleId;
    /**
     * 图片对象
     */
    private List<MultipartFile> files;

}
